

const DEBUG = false; //是否是调试模式  false线上环境  true是调用本地自己模拟json
//var BASE_URL = 'http://www1.kaililaw.com/kaili/web/'//测试
//var BASE_URL = ''

if (process.env.NODE_ENV == 'development') {
  BASE_URL ="http://www-api.kaililaw.com/kaili/web/" ;//开发环境
  basePath="http://irobot.pluslegal.cn/"
 } else if (process.env.NODE_ENV == 'production') {
  BASE_URL ="http://www-api.kaililaw.com/kaili/web/" //生产环境
  basePath="https://jiqiren.pluslegal.cn/"
 } else {
  BASE_URL ="http://www-api.kaililaw.com/kaili/web/"//测试环境
  basePath="http://irobot.pluslegal.cn/"
 }
 //var BASE_URL ="http://192.168.1.157:9666/api/"//测试环境 
 var BASE_URL ="http://faku.kaililaw.com/api/"

 var basePath="https://mini.kaililaw.com/"
//server  服务器接口
//local   本地模拟数据接口
let API = {
  'server': {
    /**************登录****************/
    "login":BASE_URL+"login",// 登陆
    /**************首页****************/
    "getIndexType": BASE_URL + "faku/getOneLevel",//{code}// 获取一级分类名称1:民生动态,2:舆情动态,3:部门规章,4:答题小游戏,5:智能咨询,6:法治云课堂
    "getSecondType": BASE_URL + "faku/getTwoLevel",//{levelOneCode}获取二级分类名称
    "getRulesList":BASE_URL+"faku/getRulesList",//{page}/{pageSize}//{twoLevelId}获取部门规章列表
    "getLiveList":BASE_URL+"faku/getLivelihoodList",//{page}/{pageSize}//{twoLevelId}获取mingsheng列表
    "getLawList":BASE_URL+"faku/getPublicOpinionList",//{page}/{pageSize}//{twoLevelId}获取yuqing列表
    "getLiveDetails":BASE_URL+"faku/detailLivelihood",//{id}获取民生动态详情
    "getlawDetails":BASE_URL+"faku/detailPublicOpinion",//{id} 获取法制舆情详情
    "getRuleDetails":BASE_URL+"faku/detailRules",//{id}  获取部门规章详情

    "getLawsList":BASE_URL+"faku/getLawsList",//{page}/{pageSize}//{twoLevelId}获取法律法规列表
    "getlawsDetails":BASE_URL+"faku/detailLaws",//{id} 获取法律法规详情
    /**************课堂接口****************/
    "getCourseList":BASE_URL+"faku/course/getCourseList",//{page}/{pageSize}// 获取课程列表
    "getChapterDetails":BASE_URL+"faku/course/detailCourseChapter",//{id}获取课程章节详情
    "getChapterList":BASE_URL+"faku/course/getCourseChapterList",//{page}/{pageSize}/{courseId}获取课程章节列表
    "getExerciseList":BASE_URL+"faku/course/getCourseExerciseList",//{page}/{pageSize}/{courseId}获取课程练习题列表
    "getVideolist":BASE_URL+"faku/course/getAllVideo",//获取整个视频资源",
    "jiqirenEnter":BASE_URL+"zhinengzixun",
    "gameEnter":BASE_URL+"yx",
    /**************考试接口****************/

    "getField":BASE_URL+"faku/exam/fields",//从业领域列表
    "getExamlist":BASE_URL+"faku/exam/getExamList",//{page}/{pageSize}/{fieldl2}获取考试列表。按开考时间倒序
    "beginExam":BASE_URL+"faku/exam/beginExam", //开始考试。如果可以考试，返回考试题。
    "addRecord":BASE_URL+"faku/exam/addRecord" ,//提交考试成绩
    "queryRecord":BASE_URL+"faku/exam/queryRecord" ,//查询考试成绩
    "recordReport":BASE_URL+"faku/exam/recordReport" ,//获取某个考试记录的答题报告
    "rank":BASE_URL+"faku/exam/rank" ,// 考试排行榜


    "getThoughGame":basePath+"rush/list/getBreakLimtIndex" //chongbang
    
  },
  'local': {
    'addteminfor': '../../../static/b.json',//添加
    'deletetem': '../../../static/d.json',//删除
    'updatetem': '../../../static/f.json',//更新
  },
}

//true是调用本地自己模拟json  false就产线环境
export default DEBUG ? API.local : API.server
